package util.chessworld;

import util.IConstant;
import util.chessworld.util.Vectors;
import util.chessworld.util.Dot;

public class Path implements IConstant {

    public void zigzag(Avatar Av) {

        boolean collision = false;
        while (!collision) {
            while (!collision) {
                Action.print(Av);
                collision = Av.moveTo(1, est);
            }
            Av.moveTo(1, nord);
            collision = Av.moveTo(8, ouest);
        }
    }

    public void star(Avatar A, Dot point_depart) {
        A.setPosition(point_depart.copy());
        boolean collision = false;
        for (Vectors dir : Direction) {
            Action.print(A);
            while (!(collision)) {
                Action.print(A);
                collision = A.moveTo(1, dir);
            }

            A.setPosition(point_depart.copy());
            collision = false;
        }
    }
}
